From e2ba86289f7524a174a8e5e27801585cacb0169a Mon Sep 17 00:00:00 2001 From: Matthias Clasen Date: Sat, 5 Mar 2011 23:25:35 -0500 Subject: [PATCH] Only count visible children during size request This was causing spacing between image and label to be requested in buttons, even though the image is invisible. --- gtk/gtkbox.c | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/gtk/gtkbox.c b/gtk/gtkbox.c index 1ff75ebb33..f508173430 100644 --- a/gtk/gtkbox.c +++ b/gtk/gtkbox.c @@ -1164,7 +1164,7 @@ gtk_box_compute_size_for_orientation (GtkBox *box, gint largest_child = 0, largest_natural = 0; for (children = private->children; children != NULL; - children = children->next, nvis_children++) + children = children->next) { GtkBoxChild *child = children->data; @@ -1190,6 +1190,8 @@ gtk_box_compute_size_for_orientation (GtkBox *box, required_size += child_size; required_natural += child_natural; + + nvis_children += 1; } } -- 2.30.2